package com.lucenten.collect.config.dao.impl;

import cn.quevo.core.beetlsql.BasicDao;
import com.lucenten.collect.config.entity.dto.ThreadStation;
import org.springframework.stereotype.Repository;

import com.lucenten.collect.config.dao.CollectConfDao;
import com.lucenten.collect.config.entity.CollectConf;
import com.lucenten.collect.config.entity.query.CollectConfQuery;

import java.util.List;

/**
 * 采集设置 Dao接口实现
 *
 * @author July july_sky@foxmail.com
 * @version 1.0
 * @date 2019/04/27 11:04:02
 * @Copyright 湘豫（北京）科技有限公司版权所有.All Rights Reserved.
 */
@Repository("collectConfDao")
public class CollectConfDaoImpl extends BasicDao<CollectConf,CollectConfQuery> implements CollectConfDao {

    @Override
    public String getSqlPre() {
        return "collect.config.collectConf.";
    }

    @Override
    public ThreadStation getCollectConfByCode(CollectConfQuery collectConfQuery) {
        return super.getBeetlSqlFactory().getObject(getSqlId("getCollectConfByCode"), collectConfQuery, ThreadStation.class);
    }

    @Override
    public List<ThreadStation> getCollectConfList(CollectConfQuery collectConfQuery) {
        return super.getBeetlSqlFactory().selectList(getSqlId("getList"),ThreadStation.class, collectConfQuery);
    }
}
